<div class="panel comments">
    <div class="ct">
        <strong class="ctr">评论</strong>
        <span class="renshu">{$comment->total()}</span>
        <span>人参，</span>
        <span class="comments-number">{$commetUserCount}</span>
        <span>条评论</span>
    </div>
    <div class="comments-list">
        <ul>
            {volist name='comment' id='v'}
            <li>
                <div class="cm-left">
                    <a href="">
                        <img src="{:_get_image_preview_url($v.from_avatar)}" class="ua" alt="">
                    </a>
                </div>
                <div class="cm-right">
                    <p class="userattr">
                        <span class="username">{$v.from_nickname|default=$v.from_username}</span>
                        <span class="date">{$v.update_time}</span>
                        <button type="button" class="rep">
                            <i class="iconfont icon-xiaoxi"></i>
                        </button>
                    </p>
                    <div class="cmcontents">
                        <div class="cbox">
                            {if$v.touser_username or $v.touser_nickname}
                            <span class="urp">@{$v.touser_nicname|default=$v.touser_username}</span>
                            {/if}
                            {$v.content|raw}
                        </div>
                        <div class="usrepform"></div>
                    </div>
                </div>
            </li>
            {/volist}
        </ul>
        <div class="page-btn-box">
            <button type="button" id="loadcommentsBtn" data-url="{:addons_url('comments://post/commnents_page',['topic_id'=>$param.topic_id,'topic_type'=>$param.topic_type])}" class="layui-btn">点击加载更多</button>
        </div>
        <div class="comment-form">
            <form class="layui-form" action='{:addons_url("comments://post/add")}' method="post">
                <div class="layui-form-item">
                    <textarea name="content" placeholder="@写下你的评论" id="" cols="30" rows="10" class="layui-textarea"></textarea>
                </div>
                <div class="layui-form-item">
                    <div class="">
                        <input type="hidden" value="{$param.topic_type|default=0}" name="topic_type">
                        <input type="hidden" value="{$param.topic_id|default=0}" name="topic_id">
                        <input type="hidden" value="{$param.from_uid|default=0}" name="from_uid">
                        <input type="hidden" value="{$param.to_uid|default=0}" name="to_uid">
                        <button class="layui-btn layui-btn-normal   " lay-submit lay-filter="comments">立即提交</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
